//
//  FTRankViewCell.m
//  FaceTo
//
//  Created by 姚冬元 on 2017/8/9.
//  Copyright © 2017年 chengbangming. All rights reserved.
//

#import "FTRankViewCell.h"

@implementation FTRankViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        [self initUI];
    }
    return self;
}

- (void)initUI
{
    _indexlbl =  [[UILabel alloc] init];
    _indexlbl.textColor = FontColor;
    _indexlbl.font = [UIFont systemFontOfSize:11];
    [self addSubview:_indexlbl];
    
    [_indexlbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.left.offset(20);
    }];
    
    _namelbl = [[UILabel alloc] init];
    _namelbl.text = @"好友昵称";
    _namelbl.textColor = FontColor;
    _namelbl.font = [UIFont systemFontOfSize:13];
    [self addSubview:_namelbl];
    
    [_namelbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.left.equalTo(_indexlbl.mas_right).with.offset(20);
    }];
    
    _scorelbl = [[UILabel alloc] init];
    _scorelbl.text = @"170分";
    _scorelbl.textColor = FontColor;
    _scorelbl.font = [UIFont systemFontOfSize:13];
    [self addSubview:_scorelbl];
    
    [_scorelbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.right.offset(-20);
    }];
}

- (void)setIndex:(NSInteger)index
{
    _indexlbl.text = [NSString stringWithFormat:@"%ld.", (long)index];
}
@end
